Use CRPEJob::GetNPages to determine the number of pages in the report.
short GetNPages ();
Returns the number of pages in the report.